package thread.semaphore;

import java.util.concurrent.Semaphore;

public class SemaphoreTest {
    public static void main(String [] args){
        Semaphore semaphore = new Semaphore(5);
        for(int i = 0 ;i < 6; i ++) {
            try {
                semaphore.acquire();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
